package com.atguigu.srb.core.controller.api;


import com.atguigu.srb.base.response.R;
import com.atguigu.srb.core.pojo.entity.IntegralGrade;
import com.atguigu.srb.core.service.IntegralGradeService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 积分等级表 前端控制器
 * </p>
 *
 * @author Atguigu
 * @since 2023-05-26
 */
@RestController
@Api(tags = "积分等级会员模块")
@RequestMapping("/api/core/integralGrade")
public class ApiIntegralGradeController {
    @Resource
    IntegralGradeService integralGradeService;



    @ApiOperation("查询借款额度")
    @GetMapping("auth/amount")
    public R getAmount(@RequestHeader("token")String token){
        BigDecimal amount = integralGradeService.getAmount(token);
        return R.ok().data("amount",amount);
    }

}

